package com.hsbc.dev.teamo4.sms.sm.dto;

import com.google.common.collect.Lists;
import com.hsbc.dev.teamo4.sms.sm.po.Menu;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @author:Kevin
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.dto
 * @Description:
 * @Date date: 2018/7/29
 */
public class MenuDto extends Menu{

    private List<MenuDto> menuDtoList= Lists.newArrayList();

    private List<PermissionDto> permissionDtoList=Lists.newArrayList();

    /**
     * adapt
     * @param menu
     * @return MenuDto
     */
    public static MenuDto adapt(Menu menu){
        MenuDto menuDto=new MenuDto();
        BeanUtils.copyProperties(menu,menuDto);
        return menuDto;
    }

    public List<MenuDto> getMenuDtoList() {
        return menuDtoList;
    }

    public void setMenuDtoList(List<MenuDto> menuDtoList) {
        this.menuDtoList = menuDtoList;
    }

    public List<PermissionDto> getPermissionDtoList() {
        return permissionDtoList;
    }

    public void setPermissionDtoList(List<PermissionDto> permissionDtoList) {
        this.permissionDtoList = permissionDtoList;
    }
}
